#include "ros/ros.h"
#include "saint_nr_9/IRdata.h"

void IRCallback(const saint_nr_9::IRdata::ConstPtr& data) {
  ROS_INFO("dt=%f R: %f cm Y=%f cm  G=%f  BU=%d  BA=%f  O=%f  W=%f" 
	   ,data->dt
	   ,data->red
	   ,data->yellow
	   ,data->green
	   ,data->blue
	   ,data->black
	   ,data->orange
	   ,data->white
	   );
}

int main(int argc, char**argv) {
  ros::init(argc, argv, "printIR");
  ros::NodeHandle n;
  ros::Subscriber sub = n.subscribe("ir_info", 1000, IRCallback);
  ros::spin();
}
